package com.tfswue.lsh.config;

import com.tfswue.lsh.listener.MyContextListener;
import com.tfswue.lsh.listener.MySessionListener;
import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ListenerConfig {
    @Bean
    public ServletListenerRegistrationBean<MyContextListener>myContextListener(){
        return new ServletListenerRegistrationBean<MyContextListener>(new MyContextListener());

    }

    @Bean
    public ServletListenerRegistrationBean<MySessionListener>myMySessionListener(){
        return new ServletListenerRegistrationBean<MySessionListener>(new MySessionListener());

    }


}
